// 不同类型的重载函数

#include <iostream>
using namespace std;

int WriteYourName(const char* name = "Barbara", int count = 5);
void WriteYourName(double x);

int main() {
    int ok = WriteYourName();
    ok = WriteYourName("Wayne", 3);
    ok = WriteYourName("Mark");

    WriteYourName(3.4);
}

int WriteYourName(const char* name, int count) {
    for (int i = 0; i < count; i++) {
        if (i != 0) {
            cout << ", ";
        }
        cout << name;
    }
    cout << "\n";
    return 1;
}

void WriteYourName(double x) {
    cout << "Barbara, 你传递给我的值是: " << x << "\n";
}